package cap2;

class PresionArterial {
	//Valores representados el milímetros de mercurio
	//Atributos de clase
	private static final int umbralMax=120;
	private static final int umbralMin=80;
	//Atributos de instancia
	private int maxima;
	private int minima;
	//Constructor
	public PresionArterial(int ma,int mi){
	//Requiere ma > mi
	  maxima = ma;
	  minima = mi;}
	//Consultas
	public int obtenerUmbralMax(){
	  return umbralMax;}
	public int obtenerUmbralMin(){
	  return umbralMin;}
	public int obtenerMaxima(){
	  return maxima;}
	public int obtenerMinima(){
	  return minima;}
	public double obtenerMaximaHP(){
	//Convierte a hectopascales
	  return maxima*0.13;}
	public double obtenerMinimaHP(){
	//Convierte a hectopascales
	  return minima*0.13;}
	public int obtenerPulso(){
	  return maxima-minima;}
	public boolean armaHipertension(){
	 return maxima > umbralMax || minima > umbralMin;
	 }
	}
